GtkLabel: fix mnemonic-keyval when use-markup is true
authorSébastien Wilmet <swilmet@src.gnome.org>
Tue, 24 Apr 2012 20:22:22 +0000 (22:22 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 17 Mar 2013 20:10:10 +0000 (16:10 -0400)
commit8e65fa1b43067f5ccebd8ab2070f678651a174d5
tree6510e015fab9096059c7970c7ec2d1e7ed491412
parentd310ea4d90f81a8441233bb31a54e7ffbd8833e4
GtkLabel: fix mnemonic-keyval when use-markup is true

To extract the mnemonic key value, the string must contain the
underscore. But when the "gtk-auto-mnemonics" setting is true and when
the Alt key is not pressed, the underscore must not be displayed. The
problem was that the 'new_str' variable was used for both purposes:
extract the text to display, and extract the accelerator character.

When the underscore must not be visible, the underscores were removed
from the 'new_str' variable before extracting the accelerator character.

Now there are two strings, one for each purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=674759
gtk/gtklabel.c